﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Admin/Views/Shared/AdminMaster.Master" Inherits="System.Web.Mvc.ViewPage<VietThuongLMS.Areas.Admin.Models.HinhAnhModel>" %>

<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" src="<%: Url.Content("~/Scripts/MicrosoftAjax.js") %>"></script>
    <script type="text/javascript" src="<%: Url.Content("~/Scripts/MicrosoftMvcValidation.js") %>"></script>
    <script type="text/javascript" src="<%: Url.Content("~/Plugins/ckeditor/ckeditor.js") %>"></script>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<legend>
        <h2>
            Cập nhật hình ảnh/video</h2>
    </legend>
    <% Html.EnableClientValidation();
       using (Html.BeginForm("Edit", "HinhAnh", new { area = "Admin" }, FormMethod.Post, new { @class = "form-horizontal", @id = "formNew", @name = "formNew", enctype = "multipart/form-data" }))
       {
    %>
    <%: Html.HiddenFor(t => t.AlbumId, new { @Value = ViewData["id"]}) %>
    <%: Html.HiddenFor(t => t.ID) %>
    <%: Html.ValidationSummary(true) %>
    <div class="control-group">
        <label class="control-label" for="strFrom">
            Tiêu đề:</label>
        <div class="controls">
            <%: Html.TextBoxFor(t => t.TenAnh, new { @class = "h30 span12", placeholder = "Tên ảnh..." })%>
            <%: Html.ValidationMessageFor(m => m.TenAnh)%>
            
        </div>
    </div>
    <%--<div class="control-group">
        <label class="control-label" for="strFrom">
            Tag :</label>
        <div class="controls">
            <%: Html.ValidationMessageFor(m => m.Tag)%>
            <%: Html.TextBoxFor(t => t.Tag, new { @class = "h30 span12", placeholder = "lễ hội, noel,..." })%>
        </div>
    </div>--%>
    <% if (ViewData["type"].ToString() == "1") {%>
    <div class="control-group">
        <label class="control-label" for="strFrom">
            Ảnh đại diện :</label>
        <div class="controls">
            <%: Html.TextBoxFor(t => t.Url, new { id = "Url", type = "file" })%>
            <%: Html.ValidationMessageFor(m => m.Url)%>
        </div>
    </div>
    <% }
               else
               { %>
    <div class="control-group">
        <label class="control-label" for="strFrom">
            Link Video :</label>
        <div class="controls">
            <%: Html.ValidationMessageFor(m => m.UrlVideo)%>
            <%: Html.TextBoxFor(t => t.UrlVideo, new { @class = "h30 span12", placeholder = "..." })%>
        </div>
    </div>
    <%} %>
    <div class="control-group">
        <div class="controls">
            <button id="btnCreate" name="btnCreate" type="submit" class="btn btn-primary">Save</button>
        </div>
    </div>
    <% } %>
</asp:Content>

